package cn.iocoder.yudao.module.eval.dal.mysql.certificationscheme;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.eval.dal.dataobject.certificationscheme.CertificationSchemeDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.eval.controller.admin.certificationscheme.vo.*;

/**
 * 认定方案表 Mapper
 *
 * @author 企业技能认定云平台
 */
@Mapper
public interface CertificationSchemeMapper extends BaseMapperX<CertificationSchemeDO> {

    default PageResult<CertificationSchemeDO> selectPage(CertificationSchemePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<CertificationSchemeDO>()
                .likeIfPresent(CertificationSchemeDO::getName, reqVO.getName())
                .eqIfPresent(CertificationSchemeDO::getTemplatePath, reqVO.getTemplatePath())
                .likeIfPresent(CertificationSchemeDO::getTemplateFilename, reqVO.getTemplateFilename())
                .eqIfPresent(CertificationSchemeDO::getStatus, reqVO.getStatus())
                .betweenIfPresent(CertificationSchemeDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(CertificationSchemeDO::getId));
    }

}